/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */

import type { MaSearchItem } from "@mineadmin/search";
import MaDictRadio from "@/components/ma-dict-picker/ma-dict-radio.vue";
import { rdDeviceRodOnlineStatusDictData } from "./common";

export default function getSearchItems(t: any): MaSearchItem[] {
  return [
    {
      label: "装置名称",
      prop: "name",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "装置名称" }) },
    },
    {
      label: "雷达数量",
      prop: "radar_num",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "雷达数量" }) },
    },
    {
      label: "在线状态",
      prop: "online",
      render: () => MaDictRadio,
      renderProps: {
        multiple: false,
        data: rdDeviceRodOnlineStatusDictData(),
      },
      itemProps: {
        rules: [{ required: true, message: "请选择在线状态" }],
      },
    },
  ];
}
